package com.samphanie.dries.annotation;

import com.samphanie.dries.validation.PasswordConstraintValidator;
import com.samphanie.dries.validation.PasswordMatchValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @Description:
 * @Author ZSY
 * @createTime 2021/2/25 15:36
 */
@Documented
@Constraint(
        validatedBy = PasswordMatchValidator.class
)
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
public @interface PasswordMatch {

    String message() default "{PasswordMatches.userDto}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
